package templates;

public class State<Template> {
    Template currentState;
    Operator<Template> currentOperator;
    Operator<Template> redoOperator;
    public Operator<Template> getRedoOperator() {
            return redoOperator;
    }
    public void setRedoOperator(Operator<Template> redoOperator) {
            this.redoOperator = redoOperator;
    }

    public State(Template state,Operator<Template> operator){
            currentState = state;
            currentOperator =operator;
    }
    public Template getCurrentState() {
            return currentState;
    }

    public Operator<Template> getCurrentOperator() {
            return currentOperator;
    }
    public String toString(){
            return currentState.toString();
    }
    
    public void setCurrentOperator(Operator<Template> operatorTemplate){
            this.currentOperator=operatorTemplate;
    }
    
    public boolean equals(State<Template> t){
            if (!this.currentState.toString().equals(t.currentState.toString())) 
                    return true; 
            else return false;
    }

    
}